package com.lu.dog.util;

import com.lu.adog.util.StringRegex;

/**
 * @author Yue
 * @date 2017/12/25 19:55
 */

public class SearchTextUtil {
    public static String getFinalSearchText(String text) {
        if (!text.contains("//")) {
            if (text.startsWith("www.") || text.startsWith("m.")
                    && (text.contains(".cn") || text.contains(".com"))) {
                return "http://" + text;
            } else {
                return "https://m.baidu.com/s?wd=" + text;
            }
        }
        return text;
    }
}
